/**
 * Created by Administrator on 2016/7/14.
 */
swan_pc
    .factory("getAllUsers",function($resource){
        return $resource('api/users',{
                'query':{
                    method: 'get'
                }
            })
    })
    .factory("getClipByLoginId",function($resource){
        return $resource('/api/users/:login/clips',{login:'@login'},{
            'query':{method:'GET',isArray:true},
            'get': {
                method: 'GET',
                isArray:true,
                transformResponse: function (data) {
                    data = angular.fromJson(data);
                    data.startTime = DateUtils.convertDateTimeFromServer(data.startTime);
                    data.endTime = DateUtils.convertDateTimeFromServer(data.endTime);
                    data.deletedAt = DateUtils.convertDateTimeFromServer(data.deletedAt);
                    return data;
                }
            }
        })
    })
    .factory("getMyFriend",function($resource){
        return $resource('api/friendPermissionsWhoAuthorizeMe',{
            'query':{
                method: 'GET'
            }
        })
    })
